package day02.text01.dao.impl;

import day02.text01.dao.ISystemDao;

import java.util.concurrent.ConcurrentHashMap;

public class SystemDaoAImp implements ISystemDao {

    ConcurrentHashMap<String,String> chm = new ConcurrentHashMap<>();

    @Override
    public String visit(String ip,String systemName) {
        return chm.put(ip,systemName);
    }

    @Override
    public boolean addToBlackList(String ip, String systemName) {
        chm.put("123","热狗");
        if(chm.contains(ip)){
            return true;
        }
        return false;
    }
}
